from selenium import webdriver
from time import sleep

driver = webdriver.Firefox()
driver.get('https://www.baidu.com/')
winsize = driver.get_window_size()
print(winsize)
print(type(winsize))
sleep(2)
driver.set_window_size(500,800)
sleep(2)
driver.quit()
